/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.tomcat.jni.FileInfo;

/**
 *
 * @author XuanTuan
 */
public class abc {

    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream  = new FileInputStream("C:\\Users\\XuanTuan\\Desktop\\Don_nvqs.doc");
        int i = fileInputStream.available();

        byte[] a1 = new byte[i];
        byte[] a2 = new byte[i];

        fileInputStream.read(a1);
        fileInputStream.read(a2);

        FileOutputStream fileOutputStream1 = new FileOutputStream("C:\\Users\\XuanTuan\\Desktop\\a1.doc");
        fileOutputStream1.write(a1);

        FileOutputStream fileOutputStream2 = new FileOutputStream("C:\\Users\\XuanTuan\\Desktop\\a2.doc");
        fileOutputStream2.write(a1);

//        fileInputStream.close();
//        fileOutputStream1.close();
//        fileOutputStream2.close();
    }
}
